package com.longma.server.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;

import com.longma.server.constant.enums.SwitchEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author HAIBO
 * @since 2021-04-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Data对象", description="")
@TableName("realtime_data")
public class RealtimeData implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "云仓id")
    private Integer yuncangId;

    @ApiModelProperty(value = "经度")
    private Double longitude;

    @ApiModelProperty(value = "纬度")
    private Double latitude;

    @ApiModelProperty(value = "电仓系统电压")
    private Double voltage;

    @ApiModelProperty(value = "电仓系统电流")
    private Double current;

    @ApiModelProperty(value = "电仓室内温度")
    private Double temperature;

    @ApiModelProperty(value = "电仓室内湿度")
    private Double humidity;

    @ApiModelProperty(value = "电源开发：0关，1开")
    private SwitchEnum powerSwitch;

    @ApiModelProperty(value = "空调开发：0关，1开")
    private SwitchEnum airSwitch;

    @ApiModelProperty(value = "照明开发：0关，1开")
    private SwitchEnum lightSwitch;

    @ApiModelProperty(value = "排风扇开发：0关，1开")
    private SwitchEnum fanSwitch;

    @ApiModelProperty(value = "实时发电功率")
    private Double pvPower;

    @ApiModelProperty(value = "实时用电功率")
    private Double usedPower;

    @ApiModelProperty(value = "日发电量")
    private Double dailyGeneration;

    @ApiModelProperty(value = "日用电量")
    private Double dailyConsumption;

    @ApiModelProperty(value = "电池温度")
    private Double batteryTemp;

    @ApiModelProperty(value = "电池充电功率")
    private Double batteryChargePower;

    @ApiModelProperty(value = "电池放电功率")
    private Double batteryDischargePower;

    @ApiModelProperty(value = "电池电压")
    private Double batteryVoltage;

    @ApiModelProperty(value = "电池充电电流")
    private Double batteryChargeCurrent;

    @ApiModelProperty(value = "电池放电电流")
    private Double batteryDischargeCurrent;

    @ApiModelProperty(value = "备注")
    private String note;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill= FieldFill.INSERT)
    private LocalDateTime createTime;
}
